{extend name="template/base" /}
{block name="content"}
<div class="page-container">
<div class="toptip">
    <h2>提示：</h2>
    <p>
      勾选需要的题型并保存<br>
    </p>
</div>
 <legend><i class="Hui-iconfont">&#xe600;</i>题型配置</legend>
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <input type="hidden" name="id" value="{$vo.id ?? ''}">
        
		
		<div class="row cl">
            <label class="form-label  f-l ml-20">题型名称：</label>
            <div class="formControls col-xs-8 col-sm-5">
                <input type="text" class="input-text" placeholder="题型名称" name="type" value="{$vo.type ?? ''}" datatype="*" nullmsg="请输入题库名称，题库名称不能为空">
            </div>
            <div class="col-xs-offset-4"></div>
        </div>
		
		<div class="row cl">
            <label class="form-label  f-l ml-20">类型排序：</label>
            <div class="formControls col-xs-8 col-sm-5">
                <input type="text" class="input-text" placeholder="排序" name="sort" value="{$vo.sort ?? '50'}" datatype="*" nullmsg="请输入题库名称，题库名称不能为空">
            </div>
            <div class="col-xs-offset-4"></div>
        </div>
		
        <div class="row cl">
            <label class="form-label  f-l ml-20">原型类别：</label>
			<div class="formControls col-xs-8 col-sm-5 skin-minimal">
				{volist name="quesType" id="type"}
				<div class="radio-box">
					<input type="radio" id="tchoice-{$key}" name="tchoice" value="{$key}" {if isset($vo) && $vo.tchoice==$key}checked="checked"{/if}} datatype="*" nullmsg="请选择题型原型">
					<label for="tchoice-{$key}">{$type}</label>
				</div>	
				{/volist}				
            </div>
            <div class="col-xs-offset-4"></div>
        </div>
		
      
        <div class="row cl">
            <div class="ml-save">
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;保存&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script>
    $(function () {


        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret){
                ajax_progress(ret);
            }
        });
    })
</script>
{/block}
